package com.chengqj.blogsso;

import com.chengqj.user.server.dto.UserLoginRequest;
import com.chengqj.user.server.dto.UserLoginResponse;
import com.chengqj.user.server.service.IUserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@EnableSwagger2
@ImportResource({"classpath:dubbo-client.xml"})
public class BlogSsoApplication {

    public static void main(String[] args) {

//        ClassPathXmlApplicationContext context=new
//                ClassPathXmlApplicationContext
//                ("dubbo-client.xml");
//        IUserService userService = (IUserService) context.getBean("userService");
//        UserLoginRequest request = new UserLoginRequest();
//        request.setUserName("userName");
//        request.setPassword("password");
//        UserLoginResponse response = userService.login(request);
//        System.out.println(response.getToken());
        SpringApplication.run(BlogSsoApplication.class, args);
    }
}
